import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);
let modules = {};
console.log("asdasdasd");
let modulesFiles = require.context("./modules", false, /\.js$/);
console.log("modulesFiles", modulesFiles);
modulesFiles.keys().forEach((files) => {
  console.log("files", files);
  modules[files.replace(/\.\/|\.js/g, "")] = modulesFiles(files).default;
});
console.log("modules", modules);
export default new Vuex.Store(modules);
